﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using VRacer;

namespace VRacer.Pages
{
    /// <summary>
    /// Interaction logic for NetGame.xaml
    /// </summary>
    public partial class NetGame : Page
    {
        public NetGame()
        {
            InitializeComponent();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            var game = new RemoteGame();
            game.HostName = _hostName.Text;
            game.Port = Int32.Parse(_port.Text);
            game.Username = _username.Text;

            Business.Instance.Game = game;
            NavigationService.Navigate(new Uri(@"Pages/Game.xaml", UriKind.Relative));
        }
    }
}
